package shop.model;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.validation.constraints.NotNull;

@Entity
public class ObP {

    @Id
    private Long oid;//订单号
    @NotNull
    private Long pid;//商品编号
    private int num;//商品数量

    public ObP(){

    }


    public ObP(Long oid, @NotNull Long pid, int num) {
        this.oid = oid;
        this.pid = pid;
        this.num = num;
    }



    public Long getOid() {
        return oid;
    }

    public void setOid(Long oid) {
        this.oid = oid;
    }

    public Long getPid() {
        return pid;
    }

    public void setPid(Long pid) {
        this.pid = pid;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }
}
